#region

using System.Drawing;
using Class.Web.Mvc;

#endregion

namespace ThuySan.Bussiness
{
    public partial class Product : IImageContent
    {
        private static readonly Size[] Size = new[] { new Size(0, 0), new Size(140,140), new Size(80,80) };

        public string GetUrl()
        {
            if (string.IsNullOrEmpty(PageUrl))
            { 
                
            }
            return string.Format("{0}/{1}/{2}.html", Category == null
                                                             ? "Category"
                                                             : Category.PageUrl, PageUrl, ProductId);
        }

        #region Implementation of IImageContent

        public Size[] ImageSize
        {
            get { return Size; }
        }

        public string GetImagePrefix()
        {
            return string.Format("{0}", ProductId);
        }

        #endregion
    }
}
